UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/7GMoCrYBTHmfsvzX/igv8KHmEeLVQ/MyWkmv2FZmAc=' 
WHERE 
  key_id = '4fbdeaee4f1d31774b3fc7b5861861ea80a3cc5ff958e7c983dae50dfbedec2e' 
  AND (
    token = '/7GMoCrYBTHmfsvzX/igv8KHmEeLVQ/MyWkmv2FZmAc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027