UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'F9ICHREyCiXM8MGxUKcwzD0oNgi3G/Yfxc/thYPCBis='
WHERE
key_id = '5d93d8c9c4297b73ad38976738cba0d9ee6f88ffde6a7efb97592adcf94ff196'
AND (
token = 'F9ICHREyCiXM8MGxUKcwzD0oNgi3G/Yfxc/thYPCBis='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)