UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '3XsBdzxbJnX/aQwQeMS03ZrtdXZj7pcZA6T3XVkF8b0=' 
WHERE 
  key_id = 'b32b7a29fab6e9256182ce1769401deb82e3ba12d1cc35a2d7653e45fdae85a4' 
  AND (
    token = '3XsBdzxbJnX/aQwQeMS03ZrtdXZj7pcZA6T3XVkF8b0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00061