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