UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '81wkc20syvyJhzAw0VR+ZZHlGz6vnvevdNfry3KjS0Q='
WHERE
key_id = '7e3ae9b3479b83718802f38e29ff2d53a07839ad802679bf04399cb6403b25f7'
AND (
token = '81wkc20syvyJhzAw0VR+ZZHlGz6vnvevdNfry3KjS0Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)