UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Cj3/EGU6/K7uwqGpIJauohxcIwl1ONK7Hke/312TnxE='
WHERE
key_id = '611d8a1bb41e7ec884fcf47923bd5ff7a4d4d79ef0673c01bd157277d8c15bf0'
AND (
token = 'Cj3/EGU6/K7uwqGpIJauohxcIwl1ONK7Hke/312TnxE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)