UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'JMfLmvuqH5V6sJiLowx0nmoqRXlPlwRH5+oY7sLqHnc=' 
WHERE 
  key_id = 'd95137fc8d1f732f9535d3524b97b257a9f5cb5afdd306252ee06612c4979955' 
  AND (
    token = 'JMfLmvuqH5V6sJiLowx0nmoqRXlPlwRH5+oY7sLqHnc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035