UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'UCguyyVu38kXqlOLndrJhFeE8XhnM9Aq9+nNKrBHBPU=' 
WHERE 
  key_id = '721ec3bb18b1caf13890d09b4bf529cf28a10816c07a3b784226cb6f05e0c887' 
  AND (
    token = 'UCguyyVu38kXqlOLndrJhFeE8XhnM9Aq9+nNKrBHBPU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018