UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'hrbSawvRrVUpmpEv4iccUN3UaFNH1S5UjUoEir5Shec='
WHERE
key_id = '4a45d4f0135be5419c883cf6b0194c8098515aae79dd28baf8cb7a84ddb7e1bb'
AND (
token = 'hrbSawvRrVUpmpEv4iccUN3UaFNH1S5UjUoEir5Shec='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)