UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'zoq3nhBCfbum6meVuMqZwoxZBgXX6JPWQMecvD54GhU=' 
WHERE 
  key_id = '7e9d22f29cbd9666db31c72f0388a43c195600eba5b9bbe13d361615714abfa2' 
  AND (
    token = 'zoq3nhBCfbum6meVuMqZwoxZBgXX6JPWQMecvD54GhU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00050