UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'cJMbEG8UvDBGZK4EPnOTEi7vqX0ZRQCR1UmBgq1L80Q='
WHERE
key_id = 'f92b32dbf5264aa3df80ff11b6b54890fe86e60b599f3e9a55fece28ef2f542c'
AND (
token = 'cJMbEG8UvDBGZK4EPnOTEi7vqX0ZRQCR1UmBgq1L80Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)