UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '9/33o1pIwvuVkWYoUbzXDSB+ErluQxCXMRcQOmpJpE0=' 
WHERE 
  key_id = 'ec814b7964ba2fd1e1595209d1cbf2b12975487ca417772fd8ee7e400e93b2bf' 
  AND (
    token = '9/33o1pIwvuVkWYoUbzXDSB+ErluQxCXMRcQOmpJpE0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00016