UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'hQeM2Ul+rRqQsGk5kymWrrVOoE/xCus37O5Vb89HI0o='
WHERE
key_id = '73127f326d195758263e27bc6c371f1ec315373cee3ed4306ef4163b119f8000'
AND (
token = 'hQeM2Ul+rRqQsGk5kymWrrVOoE/xCus37O5Vb89HI0o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)