UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2LSQ1iYU9B3MaCdU/vEMvRz93EGAyOcEkbVnoJ6Ljxs='
WHERE
key_id = '62a64f35254115d07dec783cefd7bc3ffde4b206edc89a966f4ba7ac4c76b690'
AND (
token = '2LSQ1iYU9B3MaCdU/vEMvRz93EGAyOcEkbVnoJ6Ljxs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)