UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '0qHq8LZaqBeVWg367+ApriQOGy0eKihpfMUVKOl/FNE=' 
WHERE 
  key_id = '71616d1c306d048bb26381cd0e951aac8bf864d4bd5a30545334a3a850863209' 
  AND (
    token = '0qHq8LZaqBeVWg367+ApriQOGy0eKihpfMUVKOl/FNE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020