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