UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'b1lRPezDUac5s/FCdHwjSYVD0g5VKxEwcgmy8Z438ps='
WHERE
key_id = '49c2841c7bf279c1a6aab44dfe6159d9df40b14ebe76e918a9cf45bb46aff003'
AND (
token = 'b1lRPezDUac5s/FCdHwjSYVD0g5VKxEwcgmy8Z438ps='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)