UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'M46/tNga2hjXzuJtXMZUCO18CV2Fs8fr4xE7sa/ULLU=' 
WHERE 
  key_id = '86be22ba1df6329892696f71175ce1011d2e0ab3ae77162f2536d097c8a7f468' 
  AND (
    token = 'M46/tNga2hjXzuJtXMZUCO18CV2Fs8fr4xE7sa/ULLU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027