UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1uwi4WDNiCeghOPnLsPUfcMOO3Fx+0NmfDlQjsXPXwQ='
WHERE
key_id = 'cec925e76ccb6ae501397a3d68f14a193416727125254266b948c6caaf76ef6f'
AND (
token = '1uwi4WDNiCeghOPnLsPUfcMOO3Fx+0NmfDlQjsXPXwQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)