UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'tUzyrnkb1NqCrsPpbSXVJVZBcc+Tz0WSw/gXSYnilVc='
WHERE
key_id = '69fb2520367fbea503e4c75d219ddb42661c13234767a8bc58c51a0649241e36'
AND (
token = 'tUzyrnkb1NqCrsPpbSXVJVZBcc+Tz0WSw/gXSYnilVc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)