UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'M0Pg+ZjEbqCy98GW2KAYAyg6kjeHVicuVz2YQ4TMQeI='
WHERE
key_id = '97c54a5b5192f2885b7816912aaeb125304882016398ec5f9507562e3c4c72bd'
AND (
token = 'M0Pg+ZjEbqCy98GW2KAYAyg6kjeHVicuVz2YQ4TMQeI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)