UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'yLh4JER4rXwxA3D14hC2mSIMP+FFCRJqzBxL/LruWOg='
WHERE
key_id = '855622cc931dac6aa59a30d894d2b49db5f97d0ca4f33b3ab7e981035dc5952e'
AND (
token = 'yLh4JER4rXwxA3D14hC2mSIMP+FFCRJqzBxL/LruWOg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)