UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GhhP1WKP/NLOjglkLpn1T1+EMJUp/ml2hjWwZWAMJYQ='
WHERE
key_id = 'db2452812d3fb142f5e90a9da5da140d004348d53f9e50e743d89cc855636080'
AND (
token = 'GhhP1WKP/NLOjglkLpn1T1+EMJUp/ml2hjWwZWAMJYQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)