UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+le2LgxnTV6zR4VCDW6yF0fyWupGodl0tsldzrpC1VU=' 
WHERE 
  key_id = '0b61f08e64345f7a2ff7937db86ce70ebcde9a7fcc0c6bbef210e4f383812ab7' 
  AND (
    token = '+le2LgxnTV6zR4VCDW6yF0fyWupGodl0tsldzrpC1VU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00037