UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'fs5KB0VahTGGAIDDgjX2QSN6egXfHNJLM0qpBVY/GDE=' 
WHERE 
  key_id = '44a69bee97415b698b5a48e28ca032f87453d79e9d4dd19f995c1a2a330f7f7c' 
  AND (
    token = 'fs5KB0VahTGGAIDDgjX2QSN6egXfHNJLM0qpBVY/GDE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00023