UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'e8eadC0A8p9/Lt7msJXt82VOy/b778nDR/jkvN+5Ero=' 
WHERE 
  key_id = '6b98fd602f171ee80b278009e2a5c78db85ff9bedae737f39f1bb5f37bd4de5f' 
  AND (
    token = 'e8eadC0A8p9/Lt7msJXt82VOy/b778nDR/jkvN+5Ero=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00014