UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'iuni3x8kOGZzwGteyYHGIQOab0YlvzNs2LJ7NnOBuaw=' 
WHERE 
  key_id = '61b62fd9a2d983e1a9892a9a31cc08859f891879e9eeb0666c6d33374fdeca5c' 
  AND (
    token = 'iuni3x8kOGZzwGteyYHGIQOab0YlvzNs2LJ7NnOBuaw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00016