UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'HofsriL2LEteVcM+M1zg/Y3ErdyLMO44rINVIsXW3ps='
WHERE
key_id = 'f7c3407e6e29e6decc345cc8e40dc7398cdde131dc694258ab0e3caa5760001e'
AND (
token = 'HofsriL2LEteVcM+M1zg/Y3ErdyLMO44rINVIsXW3ps='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)