UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VPD5lFPIPYc+Cl2EqAYNdfKaLvhS7E9s2h0QqlE1N/U='
WHERE
key_id = '292e2609598c487395a6f46e79c7ec67d537479f5b4ca2ee7780f0e7c7a2ada7'
AND (
token = 'VPD5lFPIPYc+Cl2EqAYNdfKaLvhS7E9s2h0QqlE1N/U='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)