UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MrU+y5m1HcV9Dh/duYLIRAKwysG5YTMGbWRK/3DJSdg='
WHERE
key_id = '3bad4ca419ccc38d2420d82833059eb734db3ff3c4fe6be95d6bc7fc5740edbe'
AND (
token = 'MrU+y5m1HcV9Dh/duYLIRAKwysG5YTMGbWRK/3DJSdg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)