UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'nZ6TiONYVCtyK9fW2EFBQgEP9YlTIStCUMsY04Lt088=' 
WHERE 
  key_id = '2405d0379e31fe0d3dcbe7cb67046c231b3b6b70b2b3cf8fc4b65ad0d7a086ae' 
  AND (
    token = 'nZ6TiONYVCtyK9fW2EFBQgEP9YlTIStCUMsY04Lt088=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00045