UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'YmFPpWnQYxtW9yXYLUxvlp7TKgBeqgbx3ftoEyhu5ig='
WHERE
key_id = '2d606cc349cbb68c9b3ddef0afe820aa25bcc44418fdb5ba52d653ca47f4bb86'
AND (
token = 'YmFPpWnQYxtW9yXYLUxvlp7TKgBeqgbx3ftoEyhu5ig='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)