UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+RAY15LJXhhXdt1dq8rPctwdpxerANDgfi3CuP6CmAc='
WHERE
key_id = '999238a71ebe25faae36a289a5e868e320047c4b0d5d1f9fa5ac0e53a04c1aff'
AND (
token = '+RAY15LJXhhXdt1dq8rPctwdpxerANDgfi3CuP6CmAc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)