UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ePC8UwXavBl7k0jfZgTB2J/2cO6ikIZ/5C8JLimKInU='
WHERE
key_id = '48058b6aa476b1db3885a5a472912d3a101d678fb65d4b371e83269e0cef917d'
AND (
token = 'ePC8UwXavBl7k0jfZgTB2J/2cO6ikIZ/5C8JLimKInU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)