UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'uLjR2/CwBlkQ0gvErBEfn/K/C9kW9zgFQIkq7zyRmvU='
WHERE
key_id = '79663a97b7c98ccee615411ea19c0dd8b6ab6a16ac3365eb28de3588cc7324cf'
AND (
token = 'uLjR2/CwBlkQ0gvErBEfn/K/C9kW9zgFQIkq7zyRmvU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)