UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'tx2l2jgJXylQIrcev61jKSq3SsgZEWH6ZWMeDZyWfQ4=' 
WHERE 
  key_id = 'd3e3d01a18b2a2d1b71abc86ca3bf37fe971cf8f24c41a72aa4b36da1bf0a495' 
  AND (
    token = 'tx2l2jgJXylQIrcev61jKSq3SsgZEWH6ZWMeDZyWfQ4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029