UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ziOeTmTCY00p9XnJWkyh/VKVBFUxL3hzb4ejNEKABXw='
WHERE
key_id = '943a1f1c0a6492f8773defe448b171e51b37e26c8df5bb6ef1b8c58e4c5d031c'
AND (
token = 'ziOeTmTCY00p9XnJWkyh/VKVBFUxL3hzb4ejNEKABXw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)