UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zaVp/dWlQdCPXmNRdw6KW0WbtbOp9DnfnLX3n29C/cU='
WHERE
key_id = '4e0be4a10f3c677ac29ddc20a414c6b1ae52610d55dbdf5dacaae432869e8f42'
AND (
token = 'zaVp/dWlQdCPXmNRdw6KW0WbtbOp9DnfnLX3n29C/cU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)