UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'lFxDoEkPtdTmKUT83mBEmUcIdgjobtNAAcDwOZJ11A8=' 
WHERE 
  key_id = '18707539414ab9061ac403f9165ce61433dc4d83aa1f185b0bc387f9afdfab53' 
  AND (
    token = 'lFxDoEkPtdTmKUT83mBEmUcIdgjobtNAAcDwOZJ11A8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030