UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'kNFWfOGe/x1V6UZrlOSipQ4joifjtJAfF8ZlmC5Ehy0='
WHERE
key_id = '92ffa5c618d6cea0e6e1cae553799c548472b092297d11add38bc01fd80c754e'
AND (
token = 'kNFWfOGe/x1V6UZrlOSipQ4joifjtJAfF8ZlmC5Ehy0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)