UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'EgrdfbMZ0o6vGNG3xep1w7Cnt+klVq8Xld88VM9Wi+s='
WHERE
key_id = '1737748100ed532039f339d71034e7d4177656aa78c2f607adedc60a05e0e6fa'
AND (
token = 'EgrdfbMZ0o6vGNG3xep1w7Cnt+klVq8Xld88VM9Wi+s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)