UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'p3elsU7scOwOWOLMZj9XRCD/T8ft0KJ5MsVkFMRsmQ4='
WHERE
key_id = '9d0da918b2f8aa7bd6047a59e492b7cd6ecb1c07d7680a25cd0e59e3f06d5f86'
AND (
token = 'p3elsU7scOwOWOLMZj9XRCD/T8ft0KJ5MsVkFMRsmQ4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)