UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+q0k9fDOo4f4jC+JnMCNhzgQ08oO4GIx5+MZBYP0l90=' 
WHERE 
  key_id = '2bcea971ce7dab6107f13e23ff814f0ee1c33fcb184206cf5c84e210011bcbef' 
  AND (
    token = '+q0k9fDOo4f4jC+JnMCNhzgQ08oO4GIx5+MZBYP0l90=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00039