UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ckBkCTv8oapY2N49S2LvP8z8XA/ZJo2jYWVc2FU249w=' 
WHERE 
  key_id = '7a5d375fd2a5c527ec50f617fc4799800a45c2d9781259d1a86bd1b9cb928fee' 
  AND (
    token = 'ckBkCTv8oapY2N49S2LvP8z8XA/ZJo2jYWVc2FU249w=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033